GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( d8f6c3...23abdb )
by Jesus
08:16
created

$(document).turbolinks:load   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
c 1
b 0
f 0
dl 0
loc 16
rs 9.9
eloc 10
nc 3
nop 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A admins.js ➔ changeBrandingImage 0 4 1
1
// BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
2
//
3
// Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
4
//
5
// This program is free software; you can redistribute it and/or modify it under the
6
// terms of the GNU Lesser General Public License as published by the Free Software
7
// Foundation; either version 3.0 of the License, or (at your option) any later
8
// version.
9
//
10
// BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
11
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
// PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
13
//
14
// You should have received a copy of the GNU Lesser General Public License along
15
// with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
16
17
$(document).on('turbolinks:load', function(){
18
  var controller = $("body").data('controller');
19
  var action = $("body").data('action');
20
21
  // Only run on the admins page.
22
  if (controller == "admins" && action == "index") {
23
    // show the modal with the correct form action url
24
    $(".delete-user").click(function(data){
25
      var uid = $(data.target).closest("tr").data("user-uid")
26
      var url = $("body").data("relative-root")
27
      if (!url.endsWith("/")) {
28
        url += "/"
29
      }
30
      url += "u/" + uid
31
      $("#delete-confirm").parent().attr("action", url)
32
    })
33
34
    // Change the color of the color inputs when the color is changed
35
    $(".colorinput-input").change(function(data) {
36
      // Get the color from the input
37
      var color = $(data.target).val()
38
39
      // Update the color in the database and reload the page
40
      $.post($("#coloring-path").val(), {color: color}).done(function(data) {
0 ignored issues
show
Unused Code introduced by
The parameter data is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
41
        location.reload()
42
      });
43
    });
44
  }
45
46
  // Only run on the admins edit user page.
47
  if (controller == "admins" && action == "edit_user") {
48
    $(".setting-btn").click(function(data){
49
      var url = $("body").data("relative-root")
50
      if (!url.endsWith("/")) {
51
        url += "/"
52
      }
53
      url += "admins?setting=" + data.target.id
54
55
      window.location.href = url
56
    })
57
  }
58
});
59
60
// Change the branding image to the image provided
61
function changeBrandingImage(path) {
62
  var url = $("#branding-url").val()
63
  $.post(path, {url: url})
64
}
65